package com.hyts.apilog.adapter;

import com.hyts.apilog.bean.AspectjBean;
import org.aspectj.lang.JoinPoint;

/**
 * project-name:coffice-toolbox
 * package-name:com.hyts.apilog.adapter
 * author:Libo/Alex
 * create-date:2019-06-15 23:42
 * copyright:libo-hyts-github
 * email:libo2dev@aliyun.com
 * description:此类主要用于:
 */
public class DefaultAspectHandlerAdapter implements AspectHandlerAdapter<JoinPoint, AspectjBean> {

    @Override
    public AspectjBean transfer(JoinPoint param) {
        return AspectjBean.builder().className(param.getKind()).methodName(param.getTarget().toString()).
                paramArray(param.getArgs()).joinPoint(param).returnParam(param.getTarget()).build();
    }
}
